/* 精简的 Hero 样式 */
:root {
  --text-main: #1d1d1f;
  --text-sub: #64748b;
  --blue-primary: #3b82f6;
  --blue-dark: #1d4ed8;
  --blue-light: #60a5fa;
  
  --hero-bg: linear-gradient(180deg, #fff 0%, #f8fbff 25%, #f0f9ff 50%, #e0f2fe 75%, #e8f4fd 100%);
  --accent-grad: linear-gradient(135deg, #1e40af 0%, #3b82f6 25%, #06b6d4 50%, #8b5cf6 75%, #ec4899 100%);
  --accent-line: linear-gradient(135deg, #3b82f6, #06b6d4, #8b5cf6);
  --btn-grad: linear-gradient(135deg, #3b82f6, #2563eb, #1d4ed8);
  --stat-grad: linear-gradient(135deg, #1d1d1f 0%, #424242 100%);
  
  /* 改进的缓动函数 */
  --easing: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --easing-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --easing-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --easing-elastic: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  
  /* 跨平台字体栈 - 为不同操作系统提供最佳字体 */
  --font-system: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --font-mono: "SF Mono", Monaco, Inconsolata, "Roboto Mono", "Droid Sans Mono", "Liberation Mono", "Menlo", "Ubuntu Mono", "Consolas", "DejaVu Sans Mono", "Courier New", monospace;
}

/* 确保页面始终从顶部开始 */
html {
  scroll-behavior: auto !important;
}

/* 页面加载时防止滚动 */
body {
  overflow-anchor: none;
}

/* 优化字体渲染 - 针对不同操作系统 */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Windows 特定字体渲染优化 */
@supports (-ms-ime-align: auto) {
  * {
    font-feature-settings: "liga" 1, "kern" 1;
  }
  
  /* Windows 下确保字体权重的一致性 */
  .heroTitleAccent {
    font-weight: 800 !important;
  }
  
  .heroSubtitle {
    font-weight: 400 !important;
  }
  
  .statValue {
    font-weight: 700 !important;
  }
  
  .button {
    font-weight: 600 !important;
  }
  
  .codeLanguage {
    font-weight: 600 !important;
  }
}

/* Chrome 和基于 Chromium 的浏览器优化 */
@supports (-webkit-appearance: none) {
  .heroTitleAccent,
  .heroSubtitle,
  .statValue,
  .button,
  .codeLanguage {
    font-display: swap;
  }
}

/* Firefox 特定优化 */
@supports (-moz-appearance: none) {
  * {
    -moz-font-feature-settings: "liga=1, kern=1";
    font-feature-settings: "liga" 1, "kern" 1;
    -moz-font-language-override: normal;
    font-language-override: normal;
  }
}

[data-theme='dark'] {
  --hero-bg: linear-gradient(180deg, #000 0%, #1a1a1c 25%, #1d1d1f 50%, #2d2d2f 75%, #1d1d1f 100%);
  --text-main: #f5f5f7;
  --text-sub: #a1a1aa;
  --stat-grad: linear-gradient(135deg, #f5f5f7 0%, #d1d5db 100%);
}

.heroBanner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 0 8rem;
  margin-top: 40px;
  text-align: center;
  overflow: hidden;
  background: var(--hero-bg);
  /* 修改页面加载动画 - 使用opacity避免布局跳动 */
  opacity: 0;
  animation: heroFadeIn 1.2s var(--easing-smooth) both;
}

/* 修改页面加载动画 - 只使用透明度变化 */
@keyframes heroFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.heroBackground,
.floatingShapes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

/* 改进浮动形状动画 */
.shape1,
.shape2,
.shape3 {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(59,130,246,.15), rgba(147,197,253,.08));
  filter: blur(1px);
  animation: floatSmooth var(--duration, 20s) var(--easing) infinite;
}

.shape1 {
  --duration: 25s;
  --size: 120px;
  width: var(--size);
  height: var(--size);
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.shape2 {
  --duration: 30s;
  --size: 80px;
  width: var(--size);
  height: var(--size);
  top: 60%;
  right: 15%;
  animation-delay: -10s;
}

.shape3 {
  --duration: 35s;
  --size: 100px;
  width: var(--size);
  height: var(--size);
  top: 80%;
  left: 70%;
  animation-delay: -20s;
}

/* 更流畅的浮动动画 */
@keyframes floatSmooth {
  0%, 100% { 
    transform: translate(0, 0) rotate(0deg) scale(1);
    opacity: 0.4;
  }
  25% { 
    transform: translate(15px, -20px) rotate(90deg) scale(1.1);
    opacity: 0.6;
  }
  50% { 
    transform: translate(-10px, -15px) rotate(180deg) scale(0.9);
    opacity: 0.3;
  }
  75% { 
    transform: translate(-20px, 10px) rotate(270deg) scale(1.05);
    opacity: 0.5;
  }
}

.heroContent {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  padding: 0 2rem;
  margin: 0 auto;
  /* 修改入场动画 - 使用scale和opacity避免位移 */
  opacity: 0;
  transform: scale(0.98);
  animation: fadeInScale 0.8s var(--easing-smooth) 0.3s both;
}

/* 修改入场动画 - 避免translateY */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.heroTitleAccent {
  font-family: var(--font-system);
  font-weight: 800;
  font-size: 3.75rem;
  line-height: 1.2;
  letter-spacing: -0.03em;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0 0 2rem;
  padding: 0.1em 0;
  position: relative;
  /* 修改字符级动画 - 避免translateY */
  opacity: 0;
  transform: scale(0.95);
  animation: titleRevealScale 1.2s var(--easing-elastic) 0.4s both;
  /* 确保跨平台字体权重一致性 */
  font-synthesis: weight style;
  /* 添加微妙的呼吸效果 */
  transform-origin: center;
}

/* 修改标题动画 - 避免translateY */
@keyframes titleRevealScale {
  from {
    opacity: 0;
    transform: scale(0.95);
    filter: blur(8px);
  }
  60% {
    opacity: 0.8;
    transform: scale(1.01);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
}

.heroTitleAccent::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -12px;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  border-radius: 2px;
  opacity: 0.7;
  background: var(--accent-line);
  /* 增强线条动画 */
  animation: expandLineSmooth 1.5s var(--easing-elastic) 0.6s both;
}

/* 改进的线条展开动画 */
@keyframes expandLineSmooth {
  from {
    width: 0;
    opacity: 0;
    transform: translateX(-50%) scaleX(0);
  }
  60% {
    width: 90px;
    opacity: 0.8;
    transform: translateX(-50%) scaleX(1.1);
  }
  to {
    width: 80px;
    opacity: 0.7;
    transform: translateX(-50%) scaleX(1);
  }
}

.heroSubtitle {
  font-family: var(--font-system);
  font-weight: 400;
  font-size: 1.375rem;
  line-height: 1.5;
  color: var(--text-sub);
  max-width: 640px;
  margin: 0 auto 2rem;
  /* 修改副标题动画 - 避免translateY */
  opacity: 0;
  animation: fadeInBlur 0.9s var(--easing-smooth) 0.5s both;
  /* 确保副标题字体一致性 */
  font-synthesis: weight style;
}

/* 修改副标题动画 - 避免位移 */
@keyframes fadeInBlur {
  from {
    opacity: 0;
    filter: blur(4px);
  }
  to {
    opacity: 1;
    filter: blur(0);
  }
}

.heroStats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 600px;
  margin: 0 auto 2rem;
  padding: 0 1rem;
  /* 修改统计卡片动画 - 避免translateY */
  opacity: 0;
  animation: fadeInScale 1.0s var(--easing-smooth) 0.7s both;
  /* 固定高度和宽度，防止布局跳动 */
  min-height: 60px;
  width: 600px;
}

.statCard {
  position: relative;
  flex: 1;
  text-align: center;
  /* 增强交互动画 */
  transition: all 0.4s var(--easing-smooth);
  /* 固定宽度，确保布局稳定 */
  width: 180px;
  flex-shrink: 0;
  /* 修改级联延迟 - 使用scale动画 */
  opacity: 0;
  transform: scale(0.9);
  animation: statCardScale 0.6s var(--easing-elastic) both;
}

/* 为每个统计卡片添加不同的延迟 */
.statCard:nth-child(1) {
  animation-delay: 0.8s;
}

.statCard:nth-child(2) {
  animation-delay: 0.9s;
}

.statCard:nth-child(3) {
  animation-delay: 1.0s;
}

/* 修改统计卡片动画 - 避免translateY */
@keyframes statCardScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.statCard:hover {
  transform: translateY(-6px) scale(1.05);
  /* 添加微妙的阴影效果 */
  filter: drop-shadow(0 8px 16px rgba(59, 130, 246, 0.15));
}

.statCard:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 30px;
  opacity: 0.6;
  background: linear-gradient(to bottom, transparent, rgba(209,213,219,.8) 50%, transparent);
}

.statValue {
  font-family: var(--font-system);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.2;
  margin: 0;
  background: var(--stat-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  /* 确保统计数字字体权重一致 */
  font-synthesis: weight style;
}

/* 按钮样式 */
.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  animation: fadeInUp 0.8s var(--easing) 0.4s both;
}

/* 快速安装代码块样式 */
.quickInstall {
  margin-top: 1.5rem;
  margin-bottom: 3rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  /* 修改安装区域动画 - 避免translateY */
  opacity: 0;
  transform: scale(0.98);
  animation: fadeInScale 1.1s var(--easing-smooth) 0.9s both;
  /* 固定宽度，防止内容变化导致布局跳动 */
  width: 700px;
}

/* 版本选择器样式 */
.versionSelector {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: center;
}

.versionTabs {
  display: flex;
  background: rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-radius: 16px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.15),
    0 4px 16px rgba(59, 130, 246, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.15) inset;
  gap: 6px;
  /* 增加宽度，给文字更多空间 */
  width: 480px;
  justify-content: space-between;
  position: relative;
}

/* 液态玻璃滑动指示器 */
.versionTabs::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 6px;
  width: 230px;
  height: 60px;
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  backdrop-filter: blur(30px) saturate(200%);
  border-radius: 12px;
  box-shadow: 
    0 6px 25px rgba(59, 130, 246, 0.2),
    0 3px 12px rgba(0, 0, 0, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  /* 改为平滑的线性动画，去除反弹效果 */
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s ease-out,
              background 0.3s ease-out;
  z-index: 1;
  /* 默认位置在第一个按钮（基础版） */
  transform: translateX(0);
  /* 添加变形效果准备 */
  transform-origin: center;
}

/* AI版本选中时，指示器移动到右边 */
.versionTabs[data-selected="ai"]::before {
  transform: translateX(236px); /* 230px宽度 + 6px间距，移除缩放效果 */
  box-shadow: 
    0 8px 30px rgba(139, 92, 246, 0.25),
    0 4px 15px rgba(0, 0, 0, 0.15),
    0 1px 0 rgba(255, 255, 255, 0.95) inset;
  background: rgba(255, 255, 255, 0.98);
}

.versionTab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  border: none;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  /* 改为平滑的线性动画，去除弹性效果 */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              color 0.2s ease-out;
  position: relative;
  overflow: hidden;
  color: rgba(30, 41, 59, 0.8);
  font-family: var(--font-system);
  font-weight: 500;
  /* 增加按钮宽度，给文字更多空间，防止换行 */
  width: 230px;
  height: 60px;
  box-sizing: border-box;
  flex-shrink: 0;
  z-index: 2; /* 确保按钮在指示器之上 */
  /* 添加变形效果准备 */
  transform-origin: center;
}

.versionTab::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.08) 0%, 
    rgba(255, 255, 255, 0.04) 100%);
  opacity: 0;
  /* 改进hover动画 */
  transition: all 0.3s var(--easing-smooth);
  border-radius: inherit;
}

.versionTab:hover::before {
  opacity: 1;
}

.versionTab:hover {
  color: rgba(30, 41, 59, 1);
  background: rgba(255, 255, 255, 0.05);
  /* 添加微妙的缩放效果和弹性动画 */
  transform: scale(1.03) translateY(-1px);
}

/* 添加点击动画 */
.versionTab:active {
  transform: scale(0.98) translateY(0px);
  transition: all 0.1s ease-out;
}

/* 为切换添加涟漪效果 */
.versionTab::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease-out, height 0.6s ease-out, opacity 0.6s ease-out;
  opacity: 0;
  pointer-events: none;
}

.versionTab:active::after {
  width: 200px;
  height: 200px;
  opacity: 1;
  transition: width 0.3s ease-out, height 0.3s ease-out, opacity 0.1s ease-out;
}

.versionTabActive {
  color: #1e293b !important;
  /* 简化激活状态动画 */
  animation: none;
}

.versionTabActive::before {
  opacity: 0 !important;
}

.versionIcon {
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  line-height: 1;
  /* 添加图标的微妙动画 */
  transition: transform 0.3s var(--easing-elastic);
}

/* 图标hover效果 - 简化动画，去除弹跳效果 */
.versionTab:hover .versionIcon {
  transform: scale(1.1) rotate(5deg);
  transition: transform 0.3s ease-out;
}

/* 激活状态的图标效果 - 保持发光但去除弹跳 */
.versionTabActive .versionIcon {
  animation: iconGlow 2s ease-in-out infinite;
}

@keyframes iconGlow {
  0%, 100% {
    filter: drop-shadow(0 0 0 transparent);
  }
  50% {
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.5));
  }
}

.versionInfo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
  min-width: 0;
  text-align: center;
}

.versionName {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  margin: 0;
  white-space: nowrap;
  text-align: center;
}

.versionDesc {
  font-size: 0.8rem;
  opacity: 0.6;
  font-weight: 400;
  line-height: 1.2;
  margin: 0;
  white-space: nowrap;
  text-align: center;
}

.versionTabActive .versionDesc {
  opacity: 0.65;
  color: #64748b;
}

/* 深色模式版本选择器适配 */
[data-theme='dark'] .versionTabs {
  background: rgba(15, 23, 42, 0.4);
  border-color: rgba(148, 163, 184, 0.15);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 4px 16px rgba(59, 130, 246, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.08) inset;
}

[data-theme='dark'] .versionTab {
  color: rgba(241, 245, 249, 0.85);
}

[data-theme='dark'] .versionTab:hover {
  color: rgba(241, 245, 249, 1);
  background: rgba(255, 255, 255, 0.03);
}

[data-theme='dark'] .versionTabActive {
  color: #1e293b !important;
}

[data-theme='dark'] .versionTabActive .versionDesc {
  color: #64748b;
}

/* 深色模式下的滑动指示器 */
[data-theme='dark'] .versionTabs::before {
  background: rgba(241, 245, 249, 0.96);
  box-shadow: 
    0 6px 25px rgba(96, 165, 250, 0.25),
    0 3px 12px rgba(0, 0, 0, 0.2),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

/* 深色模式下AI版本选中时的效果 */
[data-theme='dark'] .versionTabs[data-selected="ai"]::before {
  box-shadow: 
    0 8px 30px rgba(139, 92, 246, 0.3),
    0 4px 15px rgba(0, 0, 0, 0.25),
    0 1px 0 rgba(255, 255, 255, 0.95) inset;
  background: rgba(241, 245, 249, 0.98);
}

.codeBlock {
  background: rgba(15, 23, 42, 0.75);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.3),
    0 6px 20px rgba(59, 130, 246, 0.15),
    0 2px 8px rgba(0, 0, 0, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.15) inset,
    0 -1px 0 rgba(0, 0, 0, 0.2) inset;
  /* 改进代码块动画 */
  transition: all 0.5s var(--easing-smooth);
  position: relative;
  /* 固定宽度，防止内容变化导致跳动 */
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  /* 添加微妙的呼吸动画 */
  animation: codeBlockBreathe 4s var(--easing) infinite;
}

/* 代码块呼吸动画 */
@keyframes codeBlockBreathe {
  0%, 100% {
    box-shadow: 
      0 12px 40px rgba(0, 0, 0, 0.3),
      0 6px 20px rgba(59, 130, 246, 0.15),
      0 2px 8px rgba(0, 0, 0, 0.1),
      0 1px 0 rgba(255, 255, 255, 0.15) inset,
      0 -1px 0 rgba(0, 0, 0, 0.2) inset;
  }
  50% {
    box-shadow: 
      0 12px 40px rgba(0, 0, 0, 0.35),
      0 6px 20px rgba(59, 130, 246, 0.2),
      0 2px 8px rgba(0, 0, 0, 0.15),
      0 1px 0 rgba(255, 255, 255, 0.18) inset,
      0 -1px 0 rgba(0, 0, 0, 0.25) inset;
  }
}

.codeBlock::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, 
    rgba(59, 130, 246, 0.12) 0%, 
    rgba(147, 51, 234, 0.08) 30%,
    rgba(236, 72, 153, 0.06) 60%,
    rgba(34, 197, 94, 0.04) 100%);
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.8;
  /* 添加渐变的微妙动画 */
  animation: gradientShift 6s ease-in-out infinite;
}

/* 渐变移动动画 */
@keyframes gradientShift {
  0%, 100% {
    background: linear-gradient(135deg, 
      rgba(59, 130, 246, 0.12) 0%, 
      rgba(147, 51, 234, 0.08) 30%,
      rgba(236, 72, 153, 0.06) 60%,
      rgba(34, 197, 94, 0.04) 100%);
  }
  50% {
    background: linear-gradient(135deg, 
      rgba(34, 197, 94, 0.12) 0%, 
      rgba(59, 130, 246, 0.08) 30%,
      rgba(147, 51, 234, 0.06) 60%,
      rgba(236, 72, 153, 0.04) 100%);
  }
}

.codeBlock:hover {
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 
    0 16px 50px rgba(59, 130, 246, 0.25),
    0 8px 25px rgba(0, 0, 0, 0.35),
    0 4px 12px rgba(59, 130, 246, 0.2),
    0 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 -1px 0 rgba(0, 0, 0, 0.3) inset;
  transform: translateY(-3px) scale(1.01);
  /* 暂停呼吸动画 */
  animation-play-state: paused;
}

/* 代码内容包装器 */
.codeContentWrapper {
  display: flex;
  align-items: center;
  position: relative;
  z-index: 1;
}

.codeHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 1;
}

.codeLanguage {
  font-family: var(--font-system);
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-synthesis: weight style;
}

.copyButton {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(59, 130, 246, 0.1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: none;
  border-radius: 12px;
  color: #60a5fa;
  cursor: pointer;
  /* 改进复制按钮动画 */
  transition: all 0.4s var(--easing-smooth);
  flex-shrink: 0;
  margin-right: 1rem;
  opacity: 0.8;
  /* 添加微妙的脉冲动画 */
  animation: copyButtonPulse 3s ease-in-out infinite;
}

/* 复制按钮脉冲动画 */
@keyframes copyButtonPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
  }
}

.copyButton:hover {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
  transform: translateY(-2px) scale(1.05);
  opacity: 1;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.25);
  /* 暂停脉冲动画 */
  animation-play-state: paused;
}

.copyButton:active {
  transform: translateY(0) scale(0.98);
  /* 添加点击反馈动画 */
  animation: copyButtonClick 0.15s ease-out;
}

/* 点击反馈动画 */
@keyframes copyButtonClick {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1);
  }
}

.copyIcon {
  font-size: 1.1rem;
  /* 改进图标动画 */
  transition: all 0.4s var(--easing-elastic);
}

.copyButton:hover .copyIcon {
  transform: scale(1.15) rotate(5deg);
}

/* 成功复制时的动画效果 */
.copyButton.copied {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  animation: copySuccess 0.6s ease-out;
}

@keyframes copySuccess {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
    background: rgba(34, 197, 94, 0.3);
  }
  100% {
    transform: scale(1);
  }
}

.codeContent {
  margin: 0;
  padding: 1.5rem 1.25rem;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 1.0rem;
  line-height: 1.5;
  color: #e2e8f0;
  background: transparent;
  overflow-x: auto;
  flex: 1;
  /* 固定高度，防止内容变化导致跳动 */
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  text-align: center;
  /* 改进代码内容的动画过渡效果 */
  transition: all 0.4s var(--easing-smooth);
  /* 确保等宽字体在所有平台上一致 */
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  /* 添加打字机效果的准备 */
  position: relative;
}

.codeContent code {
  color: #e2e8f0;
  background: transparent;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
  word-wrap: break-word;
  white-space: pre-wrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  font-weight: 500;
  /* 改进代码文本的动画过渡 */
  transition: all 0.4s var(--easing-smooth);
  opacity: 1;
  transform: translateY(0);
  /* 添加字符级动画效果 */
  animation: codeReveal 0.8s var(--easing-smooth) 1.2s both;
}

/* 代码文字显示动画 */
@keyframes codeReveal {
  from {
    opacity: 0;
    transform: translateY(10px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* 代码内容hover效果 */
.codeContent:hover code {
  color: #f1f5f9;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  transform: scale(1.01);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 160px;
  padding: 0.875rem 1.75rem;
  border-radius: 16px;
  border: 0;
  cursor: pointer;
  font-family: var(--font-system);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  text-decoration: none !important;
  /* 改进按钮动画 */
  transition: all 0.4s var(--easing-smooth);
  font-synthesis: weight style;
  /* 添加按钮的微妙动画 */
  animation: buttonFloat 4s ease-in-out infinite;
  /* 防止动画时布局偏移 */
  transform-origin: center;
}

/* 按钮浮动动画 */
@keyframes buttonFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

.button--primary {
  color: #fff !important;
  background: var(--btn-grad);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}
.button--primary:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 40px rgba(59, 130, 246, 0.4);
  /* 暂停浮动动画 */
  animation-play-state: paused;
}

.button--secondary {
  color: var(--blue-dark) !important;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid rgba(59, 130, 246, 0.25);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.12);
}
.button--secondary:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 12px 40px rgba(59, 130, 246, 0.2);
  /* 暂停浮动动画 */
  animation-play-state: paused;
}

.buttonIcon {
  font-size: 1.25rem;
  /* 改进图标动画 */
  transition: transform 0.4s var(--easing-elastic);
}
.buttonArrow {
  font-size: 0.9rem;
  opacity: 0.8;
  /* 改进箭头动画 */
  transition: all 0.4s var(--easing-elastic);
}
.button:hover .buttonIcon {
  transform: scale(1.15) rotate(5deg);
}
.button:hover .buttonArrow {
  transform: translateX(4px);
  opacity: 1;
}

/* 深色模式适配 */
[data-theme='dark'] .codeBlock {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(148, 163, 184, 0.2);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.5),
    0 6px 20px rgba(59, 130, 246, 0.2),
    0 2px 8px rgba(0, 0, 0, 0.2),
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 -1px 0 rgba(0, 0, 0, 0.3) inset;
}

[data-theme='dark'] .codeBlock:hover {
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 
    0 16px 50px rgba(59, 130, 246, 0.3),
    0 8px 25px rgba(0, 0, 0, 0.6),
    0 4px 12px rgba(59, 130, 246, 0.25),
    0 1px 0 rgba(255, 255, 255, 0.15) inset,
    0 -1px 0 rgba(0, 0, 0, 0.4) inset;
}

[data-theme='dark'] .copyButton {
  background: rgba(59, 130, 246, 0.08);
  color: #93c5fd;
}

[data-theme='dark'] .copyButton:hover {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

[data-theme='dark'] .codeContent {
  color: #f1f5f9;
}

[data-theme='dark'] .codeContent code {
  color: #f1f5f9;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

[data-theme='dark'] .statCard:not(:last-child)::after {
  background: linear-gradient(to bottom, transparent, rgba(75,85,99,.8) 50%, transparent);
}

[data-theme='dark'] .button--secondary {
  color: var(--blue-light) !important;
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(96, 165, 250, 0.3);
}

/* 响应式设计 - 中等屏幕 (769px - 996px) */
@media (max-width: 996px) and (min-width: 769px) {
  .heroBanner {
    padding: 1.5rem 0 6rem;
    min-height: 90vh;
  }
  .heroTitleAccent {
    font-size: 3.25rem;
    line-height: 1.2;
  }
  .heroSubtitle {
    font-size: 1.25rem;
  }
  .button {
    width: 100%;
    max-width: 280px;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
  }
  .quickInstall {
    margin-top: 2rem;
    padding: 0 1rem;
    width: auto;
    max-width: 100%;
  }
  .codeContent {
    font-size: 1rem;
    padding: 1rem;
  }
  .heroStats {
    width: auto;
    max-width: 100%;
  }
  .statCard {
    width: auto;
    flex: 1;
  }
  
  /* 中等屏幕的版本选择器仍使用垂直布局 */
  .versionTabs {
    flex-direction: column;
    width: 100%;
    max-width: 500px;
    gap: 8px;
    padding: 8px;
  }
  
  .versionTabs::before {
    width: calc(100% - 16px);
    height: 80px;
    transform: translateY(0);
    /* 移动端也使用平滑线性动画 */
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s ease-out;
  }
  
  .versionTabs[data-selected="ai"]::before {
    transform: translateY(88px); /* 80px高度 + 8px间距，移除缩放 */
    box-shadow: 
      0 8px 30px rgba(139, 92, 246, 0.25),
      0 4px 15px rgba(0, 0, 0, 0.15),
      0 1px 0 rgba(255, 255, 255, 0.95) inset;
  }
  
  .versionTab {
    width: 100%;
    height: 80px;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    text-align: left;
    gap: 1rem;
    padding: 1rem 1.5rem;
  }
  
  .versionIcon {
    font-size: 2rem;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
  }
  
  .versionInfo {
    align-items: flex-start;
    text-align: left;
    gap: 4px;
    flex: 1;
  }
  
  .versionName {
    font-size: 1.1rem;
  }
  
  .versionDesc {
    font-size: 0.9rem;
  }
}

/* iPhone Pro 系列和类似尺寸设备优化 (375px - 430px) */
@media (max-width: 430px) and (min-width: 375px) {
  .heroBanner {
    padding: 1.25rem 0 5rem;
    min-height: 85vh;
  }
  
  .heroTitleAccent {
    font-size: 2.8rem;
    line-height: 1.15;
    margin-bottom: 1.5rem;
  }
  
  .heroSubtitle {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
  }
  
  .heroStats {
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    width: auto;
    max-width: 300px;
    min-height: 0;
  }
  
  .statCard {
    width: 100%;
    padding: 0.5rem;
    text-align: center;
  }
  
  .statCard:not(:last-child)::after {
    display: none;
  }
  
  .statValue {
    font-size: 1.1rem;
  }
  
  .quickInstall {
    margin-top: 1.5rem;
    width: auto;
    max-width: 100%;
    padding: 0 1rem;
  }
  
  .versionTabs {
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    gap: 8px;
    padding: 8px;
  }
  
  /* iPhone Pro 滑动指示器调整 */
  .versionTabs::before {
    width: calc(100% - 16px);
    height: 85px;
    transform: translateY(0);
    border-radius: 10px;
  }
  
  .versionTabs[data-selected="ai"]::before {
    transform: translateY(93px); /* 85px高度 + 8px间距 */
  }
  
  .versionTab {
    width: 100%;
    min-width: auto;
    height: 85px;
    padding: 1rem;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    text-align: left;
    gap: 0.75rem;
  }
  
  .versionIcon {
    font-size: 1.8rem;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
  }
  
  .versionInfo {
    align-items: flex-start;
    text-align: left;
    gap: 2px;
    flex: 1;
  }
  
  .versionName {
    font-size: 1rem;
    font-weight: 600;
  }
  
  .versionDesc {
    font-size: 0.8rem;
    opacity: 0.7;
  }
  
  .codeBlock {
    margin: 0;
    border-radius: 16px;
  }
  
  .codeContent {
    font-size: 0.85rem;
    padding: 0.75rem;
    min-height: 50px;
    line-height: 1.4;
    word-break: break-all;
    white-space: pre-wrap;
    text-align: left;
    justify-content: flex-start;
  }
  
  .copyButton {
    width: 32px;
    height: 32px;
    margin-right: 0.5rem;
    border-radius: 8px;
  }
  
  .copyIcon {
    font-size: 0.9rem;
  }
  
  .codeHeader {
    padding: 0.5rem 0.75rem;
  }
  
  .codeLanguage {
    font-size: 0.75rem;
  }
}

/* 适用于更大的移动设备和小平板 (431px - 768px) */
@media (max-width: 768px) and (min-width: 431px) {
  .heroBanner {
    padding: 1rem 0 4rem;
    min-height: 85vh;
  }
  .heroTitleAccent {
    font-size: 2.75rem;
    line-height: 1.2;
  }
  .heroSubtitle {
    font-size: 1.125rem;
    margin-bottom: 2rem;
  }
  .heroStats {
    gap: 1rem;
    max-width: 400px;
    margin-bottom: 2rem;
    width: auto;
  }
  .quickInstall {
    margin-top: 1.5rem;
    max-width: 100%;
    padding: 0 1rem;
    width: auto;
  }
  .versionTabs {
    flex-direction: column;
    padding: 8px;
    max-width: 100%;
    gap: 8px;
  }
  
  .versionTabs::before {
    width: calc(100% - 16px);
    height: 90px;
    transform: translateY(0);
  }
  
  .versionTabs[data-selected="ai"]::before {
    transform: translateY(98px); /* 90px高度 + 8px间距 */
  }
  
  .versionTab {
    padding: 1.2rem;
    gap: 0.5rem;
    text-align: center;
    flex-direction: column;
    height: 90px;
    justify-content: center;
    align-items: center;
    width: 100%;
  }
  .versionIcon {
    font-size: 2rem;
    width: 36px;
    height: 36px;
    margin-bottom: 0.25rem;
  }
  .versionInfo {
    align-items: center;
    text-align: center;
    gap: 4px;
  }
  .versionName {
    font-size: 1.1rem;
  }
  .versionDesc {
    font-size: 0.85rem;
  }
  .codeContentWrapper {
    align-items: center;
  }
  .copyButton {
    width: 36px;
    height: 36px;
    margin-right: 0.75rem;
  }
  .copyIcon {
    font-size: 1rem;
  }
  .codeHeader {
    padding: 0.625rem 0.875rem;
  }
  .codeLanguage {
    font-size: 0.8125rem;
  }
  .codeContent {
    font-size: 0.9rem;
    padding: 0.875rem;
  }
}

/* 适用于更小的设备 (最大374px) */
@media (max-width: 374px) {
  .heroBanner {
    padding: 1rem 0 3rem;
    min-height: 80vh;
  }
  
  .heroTitleAccent {
    font-size: 2.4rem;
    line-height: 1.1;
    margin-bottom: 1rem;
  }
  
  .heroSubtitle {
    font-size: 1rem;
    margin-bottom: 1rem;
    padding: 0 0.5rem;
  }
  
  .heroStats {
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
    width: auto;
    max-width: 280px;
  }
  
  .statCard {
    width: 100%;
    padding: 0.4rem;
  }
  
  .statValue {
    font-size: 1rem;
  }
  
  .quickInstall {
    margin-top: 1rem;
    padding: 0 0.75rem;
  }
  
  .versionTabs {
    gap: 6px;
    padding: 6px;
  }
  
  .versionTabs::before {
    width: calc(100% - 12px);
    height: 75px;
  }
  
  .versionTabs[data-selected="ai"]::before {
    transform: translateY(81px); /* 75px高度 + 6px间距 */
  }
  
  .versionTab {
    height: 75px;
    padding: 0.75rem;
    gap: 0.5rem;
  }
  
  .versionIcon {
    font-size: 1.6rem;
    width: 28px;
    height: 28px;
  }
  
  .versionName {
    font-size: 0.9rem;
  }
  
  .versionDesc {
    font-size: 0.75rem;
  }
  
  .codeContent {
    font-size: 0.8rem;
    padding: 0.6rem;
    line-height: 1.3;
  }
  
  .copyButton {
    width: 28px;
    height: 28px;
    margin-right: 0.4rem;
  }
  
  .copyIcon {
    font-size: 0.8rem;
  }
}

/* 移除旧的 float 动画，因为我们重新定义了 */

/* 改进的动画定义 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* 移除旧的 expandLine 动画，因为我们重新定义了 */

/* 保留一些传统动画供备用 */
@keyframes slideInFromBottom {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* 添加新的实用动画 */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 添加性能优化 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .heroTitleAccent,
  .codeBlock,
  .copyButton,
  .button {
    animation: none !important;
  }
}